#!/bin/sh
#
# INPUT: <name> [ <title> ]?
#
# Example
#
#  % ./create_state NewYork
#  % ./create_state NewYork "new york"
#

name=$1
shift

title=$1
shift

if [ "x$title" = "x" ]; then
    title=$name
fi

mkdir -p $name
cat templates/state.php | sed -e s/_title_/$title/g > $name/index.php
cat templates/Makefile.state > $name/Makefile